package xkp.lesson.springboot_shiro.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import xkp.lesson.springboot_shiro.dao.BuildingDao;
import xkp.lesson.springboot_shiro.entity.Building;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@Service
public class BuildingService {
    @Resource
    private BuildingDao buildingDao;
    public List<Building> selectAllByUserId(Integer userId){
        return buildingDao.selectByUserId(userId);
    }

    public int insert(Building building){
        return buildingDao.insertSelective(building);
    }
}
